This minor version has been deprecated
MuleSoft Accelerator for Salesforce Service Cloud icon

MuleSoft Accelerator for Salesforce Service Cloud

(0 reviews)

Use case 1 - Order history

Overview

The following use case is covered:

  • Order History (Service Cloud <- OMS)

This use case shows you how to view the order history data from an external Order Management System (OMS) for the past 90 days within Service Cloud. The API should also allow searching for order history for a user-entered date-range.

High-level architecture

sfc-sc-api-led-architecture.png

Workflow

  1. Service Cloud requests order history for a given customer/account number
  2. Determine OMS to call, based on configuration.
  3. Call OMS and transform order data into a standard format.
  4. Return order information to API Client.
  5. In case of error, return proper error code to Service Cloud.

Sequence diagram

sfc-sc-sequence-diagram.png

Systems involved

  • Service Cloud
  • OMS: Currently represented by an open-source OMS (Apache OFBiz)

Setup instructions

Order Management System (OMS) Configuration

To set up the demonstration OMS DB application:

  • Create the orders tables using the SQL scripts provided in the Mule project
  • Insert orders data into the orders table.

Reference the Mule project "OMS System API" for SQL DDL scripts, which are located under src/test/resources/db_scripts.

Mule projects

Follow the README instructions in the following Mule template projects to set up, deploy, and run these projects.

  1. Salesforce Experience API | API Specification | Implementation Template
  2. Customers Process API | API Specification | Implementation Template
  3. OMS System API | API Specification | Implementation Template

Service Cloud Lightning Web Component (LWC) Setup

See the LWC page for more information, as well as detailed instructions on how to install the Light Web Component order history.

Service Cloud components & configurations:

  • Lightning Web Components (LWC) will be configured to show order history information. Below is how it appears in Service Cloud

(Screenshot of the Lightning Web Component)

sfc-sc-sc-components.png

Data elements & mapping

  • The table below illustrates the mapping from OFBiz order fields to the fields display by the LWC on Service Cloud
OFBiz field nameLWC field nameDescription
customerIdpartyIdUnique customer identification number
saleorderIdorderIdUnique Sale order number
orderNoorderIdUnique number assigned to this order and displayed to end users.
saleorderTypeorderTypeIdThe type of order. Change, Renewal or Amendment
originalOrderorderIdReference to the parent order. Needed for reship, exchange and even swap orders
saleorderStatusstatusIdCurrent order status e.g Draft, Read for Review, Placed, Read for Activation, Activated
orderstartDateorderDateDate at which the order becomes effective. For subscription-type orders, this would be the date when the subscription begins.
orderendDatenullDate at which the order ends. For subscription-type orders, this would be the date when the subscription ends.
promiseDatenullDate the promise of the order would be fulfilled
filedDateorderDateDate the order was filed

Reviews

TypeCustom
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onOct 30, 2020
Asset overview

Asset versions for 1.3.x

Asset versions
StatusVersionActions
1.3.0